
import Yacc from "../../../main/js/com/1110111011101110/yacc/Yacc";

import src  from "./Rules.js"
import Syntax from "./Syntax";
import Switch from "./switch/Switch";

import RulesSplit from "./RulesSplit.js";

let srt1=[{type:'把',        'data':'把'},
           {type:'名词',     'data':'选中'},
           {type:'的',       'data':'的'},
           {type:'名词',     'data':'字'},
           {type:'动词',     'data':'移动'},
           {type:'到',       'data':'到'},
           {type:'名词',     'data':'最后'}]



let yacc=new RulesSplit(src)

console.table(yacc.rules)
let yacc1=new Syntax(yacc)
let tree=yacc1.run(srt1,yacc)
debugger
let swit =new Switch()

 swit.run(tree)
debugger
let data2=swit.findTree()
debugger
let data3=swit.findArray();
let data=swit.findPhere();
debugger
console.table(tree)
console.table(data)
console.table(data2)
console.table(data3)
